package com.xiguaji.tiktok.task.fansportrait;

import com.gugee.tiktok.common.model.mysql.BloggerLog;
import com.xiguaji.tiktok.task.fansportrait.service.FansPortraitService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 粉丝画像定时循环发送任务
 */
@Component
@Slf4j
public class FansPortraitTask {
    @Autowired
    FansPortraitService fansPortraitService;

    /**
     * 根据规定时间内博主发的视频id，发送kafka消息去刷新博主视频的粉丝画像
     * @param param
     * @return
     */
    @XxlJob("sendAwewe2kafka2refreshFansPortraitHandler")
    public ReturnT<String> sendBloggerAndAwewe2kafkaHandler(String param) {
        return fansPortraitService.xxlJobStart(BloggerLog.BloggerLogType.SEND_AWEWE_2_KAFKA_FANS_PORTRAIT,
                "sendAwewe2kafka2refreshFansPortraitHandler",param,false);
    }
}


